#!/usr/bin/env python
import time
import random
import Dice as dice

dice.init()
dice.test()
dice.description()

# counting from 1 to 6
for i in range (1,7):
  dice.set_dice(i)
  time.sleep(0.5)

dice.set_dice(0)

# generating random numbers by pressing switch
while True:
  if dice.get_switch():
    dice.set_dice(random.randrange(1,7))
  time.sleep(.05)
